package com.ms.p2p.dao;



import com.ms.common.utils.PageData;
import com.ms.p2p.entity.Page;
import com.ms.p2p.entity.content.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface ArticleDao extends CrudDao<Article> {

    List<Article> findPage(int pageSize, int pageNum, boolean all,
                           Integer type, Integer status);

    int count(Integer type, Integer status);


    List<Article> findByPage(@Param("begin") Integer begin,
                             @Param("size") Integer size, @Param("title") String title,
                             @Param("author") String author, @Param("status") String status,
                             @Param("type") String type,
                             @Param("issueDate_begin") String issueDate_begin,
                             @Param("issueDate_end") String issueDate_end);

    int findCount(@Param("title") String title,
                  @Param("author") String author, @Param("status") String status,
                  @Param("type") String type,
                  @Param("issueDate_begin") String issueDate_begin,
                  @Param("issueDate_end") String issueDate_end);

    List<PageData> datalistAll(Page pages);
}
